//
//  RepairDetailV2TableViewCell.m
//  GetPowerDBO
//
//  Created by 周博 on 2017/7/25.
//  Copyright © 2017年 BogoZhou. All rights reserved.
//

#import "RepairDetailV2TableViewCell.h"

@implementation RepairDetailV2TableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)showDataWithModel:(WaitingRepairDetailModel *)model withType:(NSString *)type storeType:(NSString *)storeType{
    model.power = [[PowerModel alloc] init];
    [model.power setValuesForKeysWithDictionary:model.charging_info_id];
    
    _labelNum.text = model.power.alias;
    
    if (type.integerValue == 0) {
        
        if (storeType.integerValue == 4) {//mima
            
            
            _labelDateLeft.text = @"充电次数：";
            _labelDate.text = [NSString stringWithFormat:@"%@",model.use_num];
            _imageViewPowerType.image = [UIImage imageNamed:@"28_mimasuo"];
        }else{
            _labelDateLeft.text = @"在线时长：";
            _labelDate.text = [NSString stringWithFormat:@"%ld小时%ld分钟",model.online_time.integerValue/60,model.online_time.integerValue%60];
            _imageViewPowerType.image = [UIImage imageNamed:@"28_WiFi"];
        }
        
        

    }else{
        _labelDateLeft.text = @"扫描时间：";
        _labelDate.text = model.app_scan_time;

    }
  
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
